'use strict';
app.controller('navTreeCtrl', ['$scope','navTreeService','toaster',function($scope,navTreeService,toaster) {
    //获取用户菜单栏
    $scope.getSystemUserFunctions=function(){
        navTreeService.getSystemUserFunctions($scope).then(function(result){
            switch (result.status){
                case 200:
                    $scope.app.tree=result.data.children;
                    break;
                default:
                    toaster.pop('error', "操作失败", "发生未知错误！请联系管理员");
                    break
            }
        });
    }

    $scope.getSystemUserFunctions();
}]);